<?php
namespace app\home\controller;

use think\Controller;
use think\Session;

class Base extends Controller
{

	function _initialize(){

		if( (int)session('uid') <= 0  || !session('uid')){

			
			json(['status'=>2000,'message'=>'請登錄','data'=>''])->send();exit;
		}

		if(!empty(session('uid'))){
				$status=db('users')->where(['id'=>session('uid')])->value('status');
				if($status==2){
					json(['status'=>2000,'message'=>'賬戶被凍結，請與管理員聯系','data'=>''])->send();exit;
				}
		}
	}	
}